#include "comm.hpp"
int main()
{
    int shmid = createShm(4096);//创建共享内存
    char *addr = (char*)shmat(shmid, NULL, 0);//连接
    sleep(2);//等待两秒
    int i = 0;
    while (i++ < 26)
    {
        printf("client# %s\n", addr);//从共享内存中取值输出
        sleep(1);
    }
    shmdt(addr);//分离
    sleep(2);
    destroyShm(shmid);//删除
    return 0;
}